--------------------------------------------------------------------------------------------------
name: <unnamed>
log: C:\Users\mexmi\Documents\newer web pages\Soc_382\logs\3rd loglin intermar class.log
log type: text
opened on: 5 Feb 2019, 10:16:22
. use "C:\Users\mexmi\Documents\newer web pages\Soc_382\Treimans ch 12 occ mobility data 6x6 versi
> on with extra vars.dta", clear
. clear all
. use "C:\Users\mexmi\Documents\newer web pages\Soc_382\five cat intermar data US 3 decades.dta",
> clear
* If you go back to the beginning of intermarriage class 2 log, you will see a description of how the crossings terms were created. We have 4 crossings terms, each of which can be thought of as indicating the difficulty from crossing from group x to group x+1. So cross1 is an estimate of the likelihood of marriage between category 1 (black people) and category 2 (Mexican American people).
. poisson count i.meth_num i.feth_num i.cross*
Iteration 0: log likelihood = -1628492.6
Iteration 1: log likelihood = -514542.18 (backed up)
Iteration 2: log likelihood = -405521.33 (backed up)
Iteration 3: log likelihood = -241959.01 (backed up)
Iteration 4: log likelihood = -147645.83
Iteration 5: log likelihood = -59259.102
Iteration 6: log likelihood = -12308.206
Iteration 7: log likelihood = -10257.604
Iteration 8: log likelihood = -10246.31
Iteration 9: log likelihood = -10246.309
Poisson regression Number of obs = 25
LR chi2(12) = 3132470.69
Prob > chi2 = 0.0000
Log likelihood = -10246.309 Pseudo R2 = 0.9935
-------------------------------------------------------------------------------------
count | Coef. Std. Err. z P>|z| [95% Conf. Interval]
--------------------+----------------------------------------------------------------
meth_num |
Mexican American | -.977803 .0181359 -53.92 0.000 -1.013349 -.9422572
Hispanic Other | -1.938943 .020284 -95.59 0.000 -1.978698 -1.899187
Non Hispanic Other | -2.506451 .0216409 -115.82 0.000 -2.548866 -2.464035
White non Hispanic | .6765227 .0185343 36.50 0.000 .6401961 .7128493
|
feth_num |
Mexican American | -.0199891 .018195 -1.10 0.272 -.0556507 .0156725
Hispanic Other | -.8181779 .0202753 -40.35 0.000 -.8579168 -.778439
Non Hispanic Other | -1.107257 .0209967 -52.73 0.000 -1.14841 -1.066104
White non Hispanic | 1.871097 .0185343 100.95 0.000 1.83477 1.907423
|
1.cross1 | -3.026666 .017803 -170.01 0.000 -3.061559 -2.991773
1.cross2 | -1.014698 .0101682 -99.79 0.000 -1.034627 -.9947684
1.cross3 | -.5411649 .0113079 -47.86 0.000 -.563328 -.5190018
1.cross4 | -1.444942 .0092927 -155.49 0.000 -1.463155 -1.426728
_cons | 10.65775 .0048495 2197.69 0.000 10.64825 10.66726
-------------------------------------------------------------------------------------
. poisgof
Deviance goodness-of-fit = 20262.62
Prob > chi2(12) = 0.0000
Pearson goodness-of-fit = 21598.27
Prob > chi2(12) = 0.0000
. * that is the crossings model. And it fits poorly, as the crossings model and the uniform association model below assume that the categories are ordinal, and these categories are not ordinal.
. gen score=meth_num*feth_num
. poisson count i.meth_num i.feth_num score
Iteration 0: log likelihood = -448819.89
Iteration 1: log likelihood = -199150.22 (backed up)
Iteration 2: log likelihood = -72023.171
Iteration 3: log likelihood = -48477.638
Iteration 4: log likelihood = -46237.124
Iteration 5: log likelihood = -46234.659
Iteration 6: log likelihood = -46234.659
Poisson regression Number of obs = 25
LR chi2(9) = 3060493.99
Prob > chi2 = 0.0000
Log likelihood = -46234.659 Pseudo R2 = 0.9707
-------------------------------------------------------------------------------------
count | Coef. Std. Err. z P>|z| [95% Conf. Interval]
--------------------+----------------------------------------------------------------
meth_num |
Mexican American | -1.712384 .0084087 -203.64 0.000 -1.728865 -1.695903
Hispanic Other | -4.42779 .01369 -323.43 0.000 -4.454622 -4.400958
Non Hispanic Other | -7.618328 .0212675 -358.21 0.000 -7.660012 -7.576645
White non Hispanic | -6.52374 .0275075 -237.16 0.000 -6.577654 -6.469826
|
feth_num |
Mexican American | -1.609809 .0084125 -191.36 0.000 -1.626297 -1.593321
Hispanic Other | -4.125007 .012931 -319.00 0.000 -4.150352 -4.099663
Non Hispanic Other | -6.986868 .0190834 -366.12 0.000 -7.024271 -6.949465
White non Hispanic | -6.092624 .0254213 -239.67 0.000 -6.142449 -6.042799
|
score | .6448603 .0020341 317.02 0.000 .6408736 .6488471
_cons | 9.695309 .0055428 1749.17 0.000 9.684445 9.706172
-------------------------------------------------------------------------------------
. poisgof
Deviance goodness-of-fit = 92239.32
Prob > chi2(15) = 0.0000
Pearson goodness-of-fit = 123297
Prob > chi2(15) = 0.0000
. save "C:\Users\mexmi\Documents\newer web pages\Soc_382\five cat intermar data US 3 decades.dta",
> replace
file C:\Users\mexmi\Documents\newer web pages\Soc_382\five cat intermar data US 3 decades.dta save
> d
. *that was the uniform model
. table meth_num feth_num, contents(mean cross1) cellwidth(10)
note: cellwidth too small, variable name truncated;
to increase cellwidth, specify cellwidth(#)
--------------------------------------------------------------------------------
husband's | wife's race/ethnicity
race/ethnicity | Black, non Mexican Am Hispanic O Non Hispan White non
--------------------+-----------------------------------------------------------
Black, non Hispanic | 0 1 1 1 1
Mexican American | 1 0 0 0 0
Hispanic Other | 1 0 0 0 0
Non Hispanic Other | 1 0 0 0 0
White non Hispanic | 1 0 0 0 0
--------------------------------------------------------------------------------
. table meth_num feth_num, contents(mean cross2) cellwidth(10)
note: cellwidth too small, variable name truncated;
to increase cellwidth, specify cellwidth(#)
--------------------------------------------------------------------------------
husband's | wife's race/ethnicity
race/ethnicity | Black, non Mexican Am Hispanic O Non Hispan White non
--------------------+-----------------------------------------------------------
Black, non Hispanic | 0 0 1 1 1
Mexican American | 0 0 1 1 1
Hispanic Other | 1 1 0 0 0
Non Hispanic Other | 1 1 0 0 0
White non Hispanic | 1 1 0 0 0
--------------------------------------------------------------------------------
. table meth_num feth_num, contents(mean cross3) cellwidth(10)
note: cellwidth too small, variable name truncated;
to increase cellwidth, specify cellwidth(#)
--------------------------------------------------------------------------------
husband's | wife's race/ethnicity
race/ethnicity | Black, non Mexican Am Hispanic O Non Hispan White non
--------------------+-----------------------------------------------------------
Black, non Hispanic | 0 0 0 1 1
Mexican American | 0 0 0 1 1
Hispanic Other | 0 0 0 1 1
Non Hispanic Other | 1 1 1 0 0
White non Hispanic | 1 1 1 0 0
--------------------------------------------------------------------------------
. table meth_num feth_num, contents(mean cross4) cellwidth(10)
note: cellwidth too small, variable name truncated;
to increase cellwidth, specify cellwidth(#)
--------------------------------------------------------------------------------
husband's | wife's race/ethnicity
race/ethnicity | Black, non Mexican Am Hispanic O Non Hispan White non
--------------------+-----------------------------------------------------------
Black, non Hispanic | 0 0 0 0 1
Mexican American | 0 0 0 0 1
Hispanic Other | 0 0 0 0 1
Non Hispanic Other | 0 0 0 0 1
White non Hispanic | 1 1 1 1 0
--------------------------------------------------------------------------------
. poisson count i.meth_num i.feth_num i.cross*
Iteration 0: log likelihood = -1628492.6
Iteration 1: log likelihood = -514542.18 (backed up)
Iteration 2: log likelihood = -405521.33 (backed up)
Iteration 3: log likelihood = -241959.01 (backed up)
Iteration 4: log likelihood = -147645.83
Iteration 5: log likelihood = -59259.102
Iteration 6: log likelihood = -12308.206
Iteration 7: log likelihood = -10257.604
Iteration 8: log likelihood = -10246.31
Iteration 9: log likelihood = -10246.309
Poisson regression Number of obs = 25
LR chi2(12) = 3132470.69
Prob > chi2 = 0.0000
Log likelihood = -10246.309 Pseudo R2 = 0.9935
-------------------------------------------------------------------------------------
count | Coef. Std. Err. z P>|z| [95% Conf. Interval]
--------------------+----------------------------------------------------------------
meth_num |
Mexican American | -.977803 .0181359 -53.92 0.000 -1.013349 -.9422572
Hispanic Other | -1.938943 .020284 -95.59 0.000 -1.978698 -1.899187
Non Hispanic Other | -2.506451 .0216409 -115.82 0.000 -2.548866 -2.464035
White non Hispanic | .6765227 .0185343 36.50 0.000 .6401961 .7128493
|
feth_num |
Mexican American | -.0199891 .018195 -1.10 0.272 -.0556507 .0156725
Hispanic Other | -.8181779 .0202753 -40.35 0.000 -.8579168 -.778439
Non Hispanic Other | -1.107257 .0209967 -52.73 0.000 -1.14841 -1.066104
White non Hispanic | 1.871097 .0185343 100.95 0.000 1.83477 1.907423
|
1.cross1 | -3.026666 .017803 -170.01 0.000 -3.061559 -2.991773
1.cross2 | -1.014698 .0101682 -99.79 0.000 -1.034627 -.9947684
1.cross3 | -.5411649 .0113079 -47.86 0.000 -.563328 -.5190018
1.cross4 | -1.444942 .0092927 -155.49 0.000 -1.463155 -1.426728
_cons | 10.65775 .0048495 2197.69 0.000 10.64825 10.66726
-------------------------------------------------------------------------------------
. poisgof
Deviance goodness-of-fit = 20262.62
Prob > chi2(12) = 0.0000
Pearson goodness-of-fit = 21598.27
Prob > chi2(12) = 0.0000
. drop score
. gen score=meth_num*feth_num
. table meth_num feth_num, contents(mean score) cellwidth(10)
note: cellwidth too small, variable name truncated;
to increase cellwidth, specify cellwidth(#)
--------------------------------------------------------------------------------
husband's | wife's race/ethnicity
race/ethnicity | Black, non Mexican Am Hispanic O Non Hispan White non
--------------------+-----------------------------------------------------------
Black, non Hispanic | 1 2 3 4 5
Mexican American | 2 4 6 8 10
Hispanic Other | 3 6 9 12 15
Non Hispanic Other | 4 8 12 16 20
White non Hispanic | 5 10 15 20 25
--------------------------------------------------------------------------------
. poisson count i.meth_num i.feth_num score
Iteration 0: log likelihood = -448819.89
Iteration 1: log likelihood = -199150.22 (backed up)
Iteration 2: log likelihood = -72023.171
Iteration 3: log likelihood = -48477.638
Iteration 4: log likelihood = -46237.124
Iteration 5: log likelihood = -46234.659
Iteration 6: log likelihood = -46234.659
Poisson regression Number of obs = 25
LR chi2(9) = 3060493.99
Prob > chi2 = 0.0000
Log likelihood = -46234.659 Pseudo R2 = 0.9707
-------------------------------------------------------------------------------------
count | Coef. Std. Err. z P>|z| [95% Conf. Interval]
--------------------+----------------------------------------------------------------
meth_num |
Mexican American | -1.712384 .0084087 -203.64 0.000 -1.728865 -1.695903
Hispanic Other | -4.42779 .01369 -323.43 0.000 -4.454622 -4.400958
Non Hispanic Other | -7.618328 .0212675 -358.21 0.000 -7.660012 -7.576645
White non Hispanic | -6.52374 .0275075 -237.16 0.000 -6.577654 -6.469826
|
feth_num |
Mexican American | -1.609809 .0084125 -191.36 0.000 -1.626297 -1.593321
Hispanic Other | -4.125007 .012931 -319.00 0.000 -4.150352 -4.099663
Non Hispanic Other | -6.986868 .0190834 -366.12 0.000 -7.024271 -6.949465
White non Hispanic | -6.092624 .0254213 -239.67 0.000 -6.142449 -6.042799
|
score | .6448603 .0020341 317.02 0.000 .6408736 .6488471
_cons | 9.695309 .0055428 1749.17 0.000 9.684445 9.706172
-------------------------------------------------------------------------------------
. poisgof
Deviance goodness-of-fit = 92239.32
Prob > chi2(15) = 0.0000
Pearson goodness-of-fit = 123297
Prob > chi2(15) = 0.0000
. *That was the uniform association model.
. nbreg count i.meth_num i.feth_num score
Fitting Poisson model:
Iteration 0: log likelihood = -448819.89
Iteration 1: log likelihood = -199150.22 (backed up)
Iteration 2: log likelihood = -72023.171
Iteration 3: log likelihood = -48477.638
Iteration 4: log likelihood = -46237.124
Iteration 5: log likelihood = -46234.659
Iteration 6: log likelihood = -46234.659
Fitting constant-only model:
Iteration 0: log likelihood = -279.13989
Iteration 1: log likelihood = -248.51927
Iteration 2: log likelihood = -248.45842
Iteration 3: log likelihood = -248.45835
Iteration 4: log likelihood = -248.45835
Fitting full model:
Iteration 0: log likelihood = -243.05506 (not concave)
Iteration 1: log likelihood = -233.78896 (not concave)
Iteration 2: log likelihood = -229.91714
Iteration 3: log likelihood = -226.12104
Iteration 4: log likelihood = -224.7236
Iteration 5: log likelihood = -224.64999
Iteration 6: log likelihood = -224.64972
Iteration 7: log likelihood = -224.64972
Negative binomial regression Number of obs = 25
LR chi2(9) = 47.62
Dispersion = mean Prob > chi2 = 0.0000
Log likelihood = -224.64972 Pseudo R2 = 0.0958
-------------------------------------------------------------------------------------
count | Coef. Std. Err. z P>|z| [95% Conf. Interval]
--------------------+----------------------------------------------------------------
meth_num |
Mexican American | -1.868956 .8171959 -2.29 0.022 -3.470631 -.2672817
Hispanic Other | -4.044556 1.002073 -4.04 0.000 -6.008583 -2.080529
Non Hispanic Other | -6.540186 1.122988 -5.82 0.000 -8.741201 -4.339171
White non Hispanic | -6.085678 1.233325 -4.93 0.000 -8.50295 -3.668406
|
feth_num |
Mexican American | -.8690387 .8117657 -1.07 0.284 -2.46007 .7219929
Hispanic Other | -3.111358 .9921977 -3.14 0.002 -5.056029 -1.166686
Non Hispanic Other | -5.213732 1.116058 -4.67 0.000 -7.401166 -3.026298
White non Hispanic | -4.958452 1.210836 -4.10 0.000 -7.331646 -2.585258
|
score | .5990573 .0937284 6.39 0.000 .415353 .7827615
_cons | 9.135195 .5880045 15.54 0.000 7.982727 10.28766
--------------------+----------------------------------------------------------------
/lnalpha | .0903066 .2472213 -.3942383 .5748515
--------------------+----------------------------------------------------------------
alpha | 1.09451 .2705861 .6741934 1.776867
-------------------------------------------------------------------------------------
Likelihood-ratio test of alpha=0: chibar2(01) = 9.2e+04 Prob>=chibar2 = 0.000
* The only test we have here is the chibar test for whether alpha, the overdispersion parameter, is significantly different from zero. Here we reject the null hypothesis that the alpha parameter is zero, which means in this case the nbreg model fits better than its poisson model twin.
. poisson count i.meth_num i.feth_num i.cross*
Iteration 0: log likelihood = -1628492.6
Iteration 1: log likelihood = -514542.18 (backed up)
Iteration 2: log likelihood = -405521.33 (backed up)
Iteration 3: log likelihood = -241959.01 (backed up)
Iteration 4: log likelihood = -147645.83
Iteration 5: log likelihood = -59259.102
Iteration 6: log likelihood = -12308.206
Iteration 7: log likelihood = -10257.604
Iteration 8: log likelihood = -10246.31
Iteration 9: log likelihood = -10246.309
Poisson regression Number of obs = 25
LR chi2(12) = 3132470.69
Prob > chi2 = 0.0000
Log likelihood = -10246.309 Pseudo R2 = 0.9935
-------------------------------------------------------------------------------------
count | Coef. Std. Err. z P>|z| [95% Conf. Interval]
--------------------+----------------------------------------------------------------
meth_num |
Mexican American | -.977803 .0181359 -53.92 0.000 -1.013349 -.9422572
Hispanic Other | -1.938943 .020284 -95.59 0.000 -1.978698 -1.899187
Non Hispanic Other | -2.506451 .0216409 -115.82 0.000 -2.548866 -2.464035
White non Hispanic | .6765227 .0185343 36.50 0.000 .6401961 .7128493
|
feth_num |
Mexican American | -.0199891 .018195 -1.10 0.272 -.0556507 .0156725
Hispanic Other | -.8181779 .0202753 -40.35 0.000 -.8579168 -.778439
Non Hispanic Other | -1.107257 .0209967 -52.73 0.000 -1.14841 -1.066104
White non Hispanic | 1.871097 .0185343 100.95 0.000 1.83477 1.907423
|
1.cross1 | -3.026666 .017803 -170.01 0.000 -3.061559 -2.991773
1.cross2 | -1.014698 .0101682 -99.79 0.000 -1.034627 -.9947684
1.cross3 | -.5411649 .0113079 -47.86 0.000 -.563328 -.5190018
1.cross4 | -1.444942 .0092927 -155.49 0.000 -1.463155 -1.426728
_cons | 10.65775 .0048495 2197.69 0.000 10.64825 10.66726
-------------------------------------------------------------------------------------
. nbreg count i.meth_num i.feth_num i.cross*
Fitting Poisson model:
Iteration 0: log likelihood = -1628492.6
Iteration 1: log likelihood = -514542.18 (backed up)
Iteration 2: log likelihood = -405521.33 (backed up)
Iteration 3: log likelihood = -241959.01 (backed up)
Iteration 4: log likelihood = -147645.83
Iteration 5: log likelihood = -59259.102
Iteration 6: log likelihood = -12308.206
Iteration 7: log likelihood = -10257.604
Iteration 8: log likelihood = -10246.31
Iteration 9: log likelihood = -10246.309
Fitting constant-only model:
Iteration 0: log likelihood = -279.13989
Iteration 1: log likelihood = -248.51927
Iteration 2: log likelihood = -248.45842
Iteration 3: log likelihood = -248.45835
Iteration 4: log likelihood = -248.45835
Fitting full model:
Iteration 0: log likelihood = -242.73332 (not concave)
Iteration 1: log likelihood = -233.56685 (not concave)
Iteration 2: log likelihood = -225.12744
Iteration 3: log likelihood = -223.79639
Iteration 4: log likelihood = -218.70413
Iteration 5: log likelihood = -213.73583
Iteration 6: log likelihood = -213.71902
Iteration 7: log likelihood = -213.71901
Negative binomial regression Number of obs = 25
LR chi2(12) = 69.48
Dispersion = mean Prob > chi2 = 0.0000
Log likelihood = -213.71901 Pseudo R2 = 0.1398
-------------------------------------------------------------------------------------
count | Coef. Std. Err. z P>|z| [95% Conf. Interval]
--------------------+----------------------------------------------------------------
meth_num |
Mexican American | -1.384657 .6048302 -2.29 0.022 -2.570103 -.1992119
Hispanic Other | -1.817025 .5603073 -3.24 0.001 -2.915207 -.7188427
Non Hispanic Other | -2.269184 .5464699 -4.15 0.000 -3.340245 -1.198122
White non Hispanic | .7621326 .6156133 1.24 0.216 -.4444473 1.968713
|
feth_num |
Mexican American | -.4742313 .6024889 -0.79 0.431 -1.655088 .7066252
Hispanic Other | -1.087938 .5654124 -1.92 0.054 -2.196126 .0202498
Non Hispanic Other | -.9830277 .5456848 -1.80 0.072 -2.05255 .0864949
White non Hispanic | 1.785483 .6156133 2.90 0.004 .5789029 2.992063
|
1.cross1 | -2.604259 .5915104 -4.40 0.000 -3.763598 -1.44492
1.cross2 | -.6298125 .4950926 -1.27 0.203 -1.600176 .340551
1.cross3 | -.956327 .459685 -2.08 0.037 -1.857293 -.0553608
1.cross4 | -1.021661 .5446708 -1.88 0.061 -2.089197 .0458737
_cons | 10.65775 .7338531 14.52 0.000 9.219427 12.09608
--------------------+----------------------------------------------------------------
/lnalpha | -.6189361 .2620997 -1.132642 -.1052301
--------------------+----------------------------------------------------------------
alpha | .5385171 .1411452 .3221809 .9001174
-------------------------------------------------------------------------------------
Likelihood-ratio test of alpha=0: chibar2(01) = 2.0e+04 Prob>=chibar2 = 0.000
. poisson count i.meth_num i.feth_num cross1 cross2 cross3 cross4
Iteration 0: log likelihood = -1628492.6
Iteration 1: log likelihood = -514542.18 (backed up)
Iteration 2: log likelihood = -405521.33 (backed up)
Iteration 3: log likelihood = -241959.01 (backed up)
Iteration 4: log likelihood = -147645.83
Iteration 5: log likelihood = -59259.102
Iteration 6: log likelihood = -12308.206
Iteration 7: log likelihood = -10257.604
Iteration 8: log likelihood = -10246.31
Iteration 9: log likelihood = -10246.309
Poisson regression Number of obs = 25
LR chi2(12) = 3132470.69
Prob > chi2 = 0.0000
Log likelihood = -10246.309 Pseudo R2 = 0.9935
-------------------------------------------------------------------------------------
count | Coef. Std. Err. z P>|z| [95% Conf. Interval]
--------------------+----------------------------------------------------------------
meth_num |
Mexican American | -.977803 .0181359 -53.92 0.000 -1.013349 -.9422572
Hispanic Other | -1.938943 .020284 -95.59 0.000 -1.978698 -1.899187
Non Hispanic Other | -2.506451 .0216409 -115.82 0.000 -2.548866 -2.464035
White non Hispanic | .6765227 .0185343 36.50 0.000 .6401961 .7128493
|
feth_num |
Mexican American | -.0199891 .018195 -1.10 0.272 -.0556507 .0156725
Hispanic Other | -.8181779 .0202753 -40.35 0.000 -.8579168 -.778439
Non Hispanic Other | -1.107257 .0209967 -52.73 0.000 -1.14841 -1.066104
White non Hispanic | 1.871097 .0185343 100.95 0.000 1.83477 1.907423
|
cross1 | -3.026666 .017803 -170.01 0.000 -3.061559 -2.991773
cross2 | -1.014698 .0101682 -99.79 0.000 -1.034627 -.9947684
cross3 | -.5411649 .0113079 -47.86 0.000 -.563328 -.5190018
cross4 | -1.444942 .0092927 -155.49 0.000 -1.463155 -1.426728
_cons | 10.65775 .0048495 2197.69 0.000 10.64825 10.66726
-------------------------------------------------------------------------------------
. poisgof
Deviance goodness-of-fit = 20262.62
Prob > chi2(12) = 0.0000
Pearson goodness-of-fit = 21598.27
Prob > chi2(12) = 0.0000
. log close
name: <unnamed>
log: C:\Users\mexmi\Documents\newer web pages\Soc_382\logs\3rd loglin intermar class.log
log type: text
closed on: 5 Feb 2019, 11:41:48
--------------------------------------------------------------------------------------------------